@import (reference) "../../../color.less";
.trade-order-board(
  @content-background-color,
  @main-font-color, @second-font-color,
   @border-color, @input-background-color
) {
  background: @content-background-color;
  transition: all .2s;
  .trade-order-board-title-container {
    .trade-order-board-title-open-tab {
      width: 50%;
      &[datatype="selected"] {
        color: @main-green-color!important;
        border-top-color: @main-green-color!important;
      }
    }
    .trade-order-board-title-close-tab {
      width: 50%;
      &[datatype="selected"] {
        color: @main-red-color!important;
        border-top-color: @main-red-color!important;
      }
    }
  }
  .trade-order-board-input-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    position: relative;
    height: 32px;
    margin: 20px 12px 0;
    font-size: 12px;
    .trade-order-board-input-title {
      display: inline-block;
      margin-left: 8px;
      color: @second-font-color;
      z-index: 10;
    }
    .trade-order-board-input {
      position: absolute;
      width: 100%;
      top: 0;
      left: 0;
      height: 100%;
      background: @input-background-color;
      color: @main-font-color;
      border-radius: 2px;
      padding-right: 8px;
      padding-left: 90px;
      border: solid 1px @border-color;
      transition: all .2s;
      &:focus {
        border-color: @main-blue-color;
      }
    }
  }

  .trade-order-board-trade-volume-tip-container {
    display: none;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    margin: 20px 12px 0;
    .trade-order-board-trade-volume-tip {
      &[datatype="long"] {
        color: @main-green-color
      }
      &[datatype="short"] {
        color: @main-red-color
      }
      span {
        color: @second-font-color;
      }
    }
  }

  .trade-order-board-error-tip-text {
    color: @main-red-color;
    margin-top: 10px;
    font-size: 12px;
    height: 14px;
    line-height: 14px;
    text-align: center;
  }

  .trade-order-board-button-container {
    display: flex;
    flex-direction: row;
    align-content: center;
    margin: 16px 12px 0;
    .trade-order-board-button {
      display: flex;
      flex: 1;
      flex-direction: row;
      align-items: center;
      justify-content: center;
      height: 30px;
      font-size: 14px;
      color: #fff;
      border-radius: 15px;
      span {
        display: inline-block;
        margin-left: 2px;
        font-size: 12px;
        opacity: 0.6;
      }
      &[datatype="buy"] {
        background: @main-green-color;
        margin-right: 6px;
      }
      &[datatype="sell"] {
        background: @main-red-color;
        margin-left: 6px;
      }
    }
  }
}

.trade-order-board-night {
  .trade-order-board(
    @content-background-color-night,
    @main-font-color-night,
    @second-font-color-night,
    @border-color-night,
    @input-background-color-night
  )
}

.trade-order-board-day {
  .trade-order-board(
    @content-background-color-day,
    @main-font-color-day,
    @second-font-color-day,
    @border-color-day,
    @input-background-color-day
  )
}
